function Http(url,type,data,success){
    $.ajax({
        url : url,
        type : type,
        contentType : 'application/json',
        dataType : 'json',
        data : data,
        success: function(result){
            success(result);
        }
    });
}
function HttpDelete(url,data,success){
    $.ajax({
        url : url,
        type : "GET",
        contentType : 'application/json',
        dataType : 'json',
        data : data,
        success: function(result){
            success(result);
        }
    });
}

function HttpPut(url,data,success){
    $.ajax({
        url : url,
        type : "POST",
        contentType : 'application/json',
        dataType : 'json',
        data : JSON.stringify(data),
        success: function(result){
            success(result);
        }
    });
}

function HttpPost(url,data,success){
    $.ajax({
        url : url,
        type : "POST",
        contentType : 'application/json',
        dataType : 'json',
        data : JSON.stringify(data),
        success: function(result){
            success(result);
        }
    });
}

HttpGet = function(url,data,success){
    $.ajax({
        url : url,
        type : "GET",
        contentType : 'application/json',
        dataType : 'json',
        data : data,
        success: function(result){
            success(result);
        },
    });
}

EmailCheck = function(email){
    var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
    if(reg.test(email)){
        return true;
    }else{
        return false;
        console.log("邮箱格式不正确")
    }
}
PasswordCheck = function(password){
    var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/;
    if(reg.test(password)){
        return true;
    }else{
        return false;
        console.log("密码简单")
    }
}
